package com.liya.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author LiYa
 * @version 1.0
 * @className HelloMVC
 * @description TODO
 * @science 2020/9/21 15:38
 */
@Controller
public class HelloMVC {

    @RequestMapping("/hello")
    public String helloworld(ModelMap map, Model model){
        map.addAttribute("hello","ModelMap");
        model.addAttribute("hello","Model");
        System.out.println("Hello Ya World");
        return "/WEB-INF/jsp/hello.jsp";
    }
}
